import React, {PropsWithChildren} from 'react'
import {View} from "@tarojs/components";
import styles from "./EditOrderFormDrawer.module.sass"
import FormDrawer, {FormDrawerProps} from "./FormDrawer";
import {UpdateOrderRequest} from "../apis/OrderApi";
import {Divider, Form, Input} from "antd";
import TextArea from "antd/es/input/TextArea";

export type OrderFormData = UpdateOrderRequest

export interface EditOrderFormDrawerProps extends PropsWithChildren<FormDrawerProps<OrderFormData>> {

}

const EditOrderFormDrawer: React.FC<EditOrderFormDrawerProps> = (props) => {
    return <>
        <FormDrawer<OrderFormData>{...props}>
            <Divider>消费者信息</Divider>
            <Form.Item label={"名称"} name="name" rules={[{required: true}]}>
                <Input/>
            </Form.Item>
            <Form.Item label={"身份证"} name="idCard">
                <Input/>
            </Form.Item>
            <Form.Item label={"手机号"} name="phoneNumber">
                <Input/>
            </Form.Item>
            <Form.Item label={"地址"} name="address">
                <Input/>
            </Form.Item>
            <Divider>商品信息</Divider>
            <Form.Item label={"品牌"} name="brand">
                <Input/>
            </Form.Item>
            <Form.Item label={"型号"} name="model">
                <Input/>
            </Form.Item>
            <Form.Item label={"序列号"} name="serialNumber">
                <TextArea/>
            </Form.Item>

        </FormDrawer>
    </>
}

export default EditOrderFormDrawer


